/*
 * @Author: hejian@myhexin.com 
 * @Date: 2019-01-18 14:22:57 
 * @Last Modified by: xiayan@myhexin.com
 * @Last Modified time: 2020-03-10
 */
//@charset "utf-8";

(function () {

    let _definedEvn = 'release'; // 定义当前环境
    const url = window.location.host;
    let payHead = '//pay.10jqka.com.cn';
    let vaservieceHead = '//vaserviece.10jqka.com.cn';
    // eq无后缀
    let eqNoSuffixHead = '//eq.10jqka.com.cn';
    if(url.indexOf('testm') >-1 || url.indexOf('fxh') >-1){
        _definedEvn = 'dev';
        payHead = '//testm.10jqka.com.cn/pay';
        vaservieceHead = '//testm.10jqka.com.cn/vaserviece';
        eqNoSuffixHead = '//testm.10jqka.com.cn';
    }else if(url.indexOf('vaserviece') > -1){
        _definedEvn = 'release';
    }else{
        _definedEvn = 'test';
    }
    const _config = {
        test: { // 内网环境地址
            indexApi: './mock2/index.json',
            compoundApi: './mock2/assistant.json',
            ownApi: './mock2/ownStock.json',
            marketApi: './mock2/marketStock.json',
            ownApi2: './mock2/ownStock2.json',
            marketApi2: './mock2/marketStock2.json',
            searchApi: './mock2/search.json',
            monitorApi: './mock2/monitor.json',
            subscribeApi: './mock2/monitor.json',
            allSummaryApi: './mock2/allSummary.json',
            allFaucetApi: './mock2/allFaucet.json',
            yesterdayAndTodayApi: './mock2/yesterdayAndToday.json',
            brokenLineApi: './mock2/brokenLine.json',
            newPoolApi: './mock2/newPool.json',
            fryPoolApi: './mock2/fryPool.json',
            fallPoolApi: './mock2/fallPool.json',
            boardDetailApi: './mock2/boardDetail.json',
            todayhq: "http://localhost:8008/code/limitAssistant/todayhq.html",
            limitSummary: "http://localhost:8008/code/limitAssistant/limitSummary.html",
            compoundDetail: "http://localhost:8008/code/limitAssistant/compoundDetail.html",
            stockLimitDetail: "http://localhost:8008/code/limitAssistant/stockLimitDetail.html",
            ztDetail: "http://localhost:8008/code/limitAssistant/ztDetail.html",
            cdn: '',
            monitorSearch: 'http://localhost:8008/code/limitAssistant/monitorSearch.html',
            judgeWeChat:'//testm.10jqka.com.cn/ozone/open/api/after_payment/mobile/wx_label/v2/query',
            wencaiSwitchApi: '//testm.10jqka.com.cn/d/charge/limit_up/config/switch/info',
            wencaiAskTextApi: '//testm.10jqka.com.cn/d/charge/limit_up/operation/ask/text',
            userAuthenticateApi: '//testm.10jqka.com.cn/d/charge/authcenter/authenticate/charge/v2/verify',
        },
        dev: { // 测试环境地址
            baseApi: "//testm.10jqka.com.cn/vaserviece/limitUp/index.php",
            // potentialApi: "./mock2/potential.json",
            potentialApi: "//testm.10jqka.com.cn/priceslimithelper/pool/qlg",
            allSummaryApi: '//testm.10jqka.com.cn/priceslimithelper/pool/ztfp?from=mobile',
            allFaucetApi: '//testm.10jqka.com.cn/priceslimithelper/pool/gnlt?from=mobile',
            yesterdayAndTodayApi: '//testm.10jqka.com.cn/priceslimithelper/stock/ztstockbehavior',
            brokenLineApi: '//testm.10jqka.com.cn/priceslimithelper/dashboard/brokenline',
            newPoolApi: '//testm.10jqka.com.cn/priceslimithelper/pool/newstock',
            fryPoolApi: '//testm.10jqka.com.cn/priceslimithelper/stock/oncelimituppool',
            fallPoolApi: '//testm.10jqka.com.cn/priceslimithelper/stock/downlimitpool',
            boardDetailApi: '//testm.10jqka.com.cn/priceslimithelper/stock/ztstockdatadetail',
            scoreApi: '//testm.10jqka.com.cn/priceslimithelper/dashboard/hotvalue',
            todayhq: "//testm.10jqka.com.cn/vaserviece/limitUp/todayhq.html",
            limitSummary: "//testm.10jqka.com.cn/vaserviece/limitUp/limitSummary.html",
            compoundDetail: "//testm.10jqka.com.cn/vaserviece/limitUp/compoundDetail.html",
            stockLimitDetail: "//testm.10jqka.com.cn/vaserviece/limitUp/stockLimitDetail.html",
            ztDetail: "//testm.10jqka.com.cn/vaserviece/limitUp/ztDetail.html",
            oldIndex: "//testm.10jqka.com.cn/vaserviece/limitUp/oldIndex.html",
            buyIndex: "//testm.10jqka.com.cn/tg_templates/vaserviece/limitUp/index.html",
            buyIndexNew: "//testm.10jqka.com.cn/tg_templates/vaserviece/limitUp/indexft.html",
            nextTradingApi: "//testm.10jqka.com.cn/tg_templates/doubleone/apiCenter/tradeDate/getNextTradeDate.php",
            cdn: '//testm.10jqka.com.cn/js/m/limitUp/',
            monitorSearch: '//testm.10jqka.com.cn/vaserviece/limitUp/monitorSearch.html',
            trendPoolApi:'//l2.10jqka.com.cn/priceslimithelper/stock/trendstockpool',
            highPoolApi:'//l2.10jqka.com.cn/priceslimithelper/stock/highstockpool',
            entranceApi:'//testm.10jqka.com.cn/dailyLimitAssistant/qa/entrance',
            detailApi:'//testm.10jqka.com.cn/dailyLimitAssistant/qa/detail',
            arrowRightImgUrl:'//testm.10jqka.com.cn/js/m/limitUp/images/arrow_right.png',
            loadingImgUrl: '//testm.10jqka.com.cn/js/m/limitUp/images/loading.gif',
            judgeWeChat:'//testm.10jqka.com.cn/ozone/open/api/after_payment/mobile/wx_label/v2/query',
            wencaiSwitchApi: '//testm.10jqka.com.cn/d/charge/limit_up/config/switch/info',
            wencaiAskTextApi: '//testm.10jqka.com.cn/d/charge/limit_up/operation/ask/text',
            userAuthenticateApi: '//testm.10jqka.com.cn/d/charge/authcenter/authenticate/charge/v2/verify',
        },
        release: { // 正式环境地址（js引用的地址要改成绝对地址）
            baseApi: "//vaserviece.10jqka.com.cn/limitUp/index.php",
            potentialApi: "//vaserviece.10jqka.com.cn/priceslimithelper/pool/qlg",
            allSummaryApi: '//vaserviece.10jqka.com.cn/priceslimithelper/pool/ztfp?from=mobile',
            allFaucetApi: '//vaserviece.10jqka.com.cn/priceslimithelper/pool/gnlt?from=mobile',
            yesterdayAndTodayApi: '//vaserviece.10jqka.com.cn/priceslimithelper/stock/ztstockbehavior',
            brokenLineApi: '//vaserviece.10jqka.com.cn/priceslimithelper/dashboard/brokenline',
            newPoolApi: '//vaserviece.10jqka.com.cn/priceslimithelper/pool/newstock',
            fryPoolApi: '//vaserviece.10jqka.com.cn/priceslimithelper/stock/oncelimituppool',
            fallPoolApi: '//vaserviece.10jqka.com.cn/priceslimithelper/stock/downlimitpool',
            boardDetailApi: '//vaserviece.10jqka.com.cn/priceslimithelper/stock/ztstockdatadetail',
            scoreApi: '//vaserviece.10jqka.com.cn/priceslimithelper/dashboard/hotvalue',
            todayhq: "//vaserviece.10jqka.com.cn/limitUp/todayhq.html",
            limitSummary: "//vaserviece.10jqka.com.cn/limitUp/limitSummary.html",
            compoundDetail: "//vaserviece.10jqka.com.cn/limitUp/compoundDetail.html",
            stockLimitDetail: "//vaserviece.10jqka.com.cn/limitUp/stockLimitDetail.html",
            ztDetail: "//vaserviece.10jqka.com.cn/limitUp/ztDetail.html",
            oldIndex: "//vaserviece.10jqka.com.cn/limitUp/oldIndex.html",
            buyIndex: "//ozone.10jqka.com.cn/tg_templates/vaserviece/limitUp/index.html",
            buyIndexNew: "//ozone.10jqka.com.cn/tg_templates/vaserviece/limitUp/indexft.html",
            nextTradingApi: "//ozone.10jqka.com.cn/tg_templates/doubleone/apiCenter/tradeDate/getNextTradeDate.php",
            cdn: '//s.thsi.cn/js/m/limitUp/',
            monitorSearch: '//vaserviece.10jqka.com.cn/limitUp/monitorSearch.html',
	        trendPoolApi:'//l2.10jqka.com.cn/priceslimithelper/stock/trendstockpool',
            highPoolApi:'//l2.10jqka.com.cn/priceslimithelper/stock/highstockpool',
	        entranceApi:'//vaserviece.10jqka.com.cn/dailyLimitAssistant/qa/entrance',
            detailApi:'//vaserviece.10jqka.com.cn/dailyLimitAssistant/qa/detail',
	        arrowRightImgUrl:'//s.thsi.cn/js/m/limitUp/images/arrow_right.png',
            loadingImgUrl:'//s.thsi.cn/js/m/limitUp/images/loading.gif',
            judgeWeChat:'//ozone.10jqka.com.cn/open/api/after_payment/mobile/wx_label/v2/query',
            wencaiSwitchApi: '//apigate.10jqka.com.cn/d/charge/limit_up/config/switch/info',
            wencaiAskTextApi: '//apigate.10jqka.com.cn/d/charge/limit_up/operation/ask/text',
            userAuthenticateApi: '//apigate.10jqka.com.cn/d/charge/authcenter/authenticate/charge/v2/verify',
        }
    };

    hxmConfig = _config[_definedEvn];
    // 合规相关接口及地址
    hxmConfig.protocolPage = payHead + '/onlinePayment/universalProtocol.html';
    hxmConfig.riskAssessmentPage = eqNoSuffixHead + '/riskAssessmentFront/index.html';
    hxmConfig.juecePage = vaservieceHead + '/webpage/newjuece-v4/index.html#/?backSource=home';
    hxmConfig.currentFromRiskPage = vaservieceHead + '/limitUp/index.html?isRiskBash=1';
    hxmConfig.riskStatusApi = eqNoSuffixHead + '/riskAssessmentFront/identify/getRiskEvaluationResult';
    hxmConfig.judgeSendApi = vaservieceHead + '/open/api/strategy_v2/qs/commission/v1/compliance';
    hxmConfig.limitUpConfig = {
        sid: 269,
        productUpadateDay: '20210929',
        introduce: '//vaserviece.10jqka.com.cn/limitUp/des.html',
        
    };
})();